﻿<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:umbraco.library="urn:umbraco.library"
	xmlns:Dic2JSExtension="urn:Dic2JSExtension"
	xmlns:msxsl="urn:schemas-microsoft-com:xslt"
				exclude-result-prefixes="msxsl umbraco.library Dic2JSExtension">
    <xsl:output method="xml" indent="yes" omit-xml-declaration="yes"/>

	<xsl:param name="LanguageId" />
	<xsl:param name="Culture" />
	
    <xsl:template match="Items">var texts = new Hash({<xsl:apply-templates select="DictionaryItem" />});
	</xsl:template>

	<xsl:template match="DictionaryItem">
		'<xsl:value-of select="@Key"/>': '<xsl:value-of select="Dic2JSExtension:CleanForJavascript(Value[@LanguageId = $LanguageId])"/>'<xsl:if test="position() != last()">, </xsl:if>
	</xsl:template>

</xsl:stylesheet>
